#########################
### Imports & Globals ###
#########################

import sys
import os
import re
import datetime

version = "0.3"
newline = "\r\n"
warnings = 0

def strip_line(line):
	stripped_line = line.strip()
	if (stripped_line[0:3] == "\xef\xbb\xbf"):
		#print "UTF8-BOM: EF-BB-BF"
		stripped_line = stripped_line[3:]
	return stripped_line

def timecode_to_milli(timecode):
	[hh, mm, ss, ms] = timecode.replace(".", ":").split(":")
	#print("hh=" + str(hh) + ", mm=" + str(mm) + ", ss=" + str(ss) + ", ms=" + str(ms))
	return (int(ms) + int(ss)*1000 + int(mm)*60*1000 + int(hh)*60*60*1000)
